# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.ToolResults.V1beta3.Model.SuggestionProto do
  @moduledoc """


  ## Attributes

  *   `helpUrl` (*type:* `String.t`, *default:* `nil`) - Reference to a help center article concerning this type of suggestion. Always set.
  *   `longMessage` (*type:* `GoogleApi.ToolResults.V1beta3.Model.SafeHtmlProto.t`, *default:* `nil`) - Message, in the user's language, explaining the suggestion, which may contain markup. Always set.
  *   `priority` (*type:* `String.t`, *default:* `nil`) - Relative importance of a suggestion. Always set.
  *   `pseudoResourceId` (*type:* `String.t`, *default:* `nil`) - A somewhat human readable identifier of the source view, if it does not have a resource_name. This is a path within the accessibility hierarchy, an element with resource name; similar to an XPath.
  *   `region` (*type:* `GoogleApi.ToolResults.V1beta3.Model.RegionProto.t`, *default:* `nil`) - Region within the screenshot that is relevant to this suggestion. Optional.
  *   `resourceName` (*type:* `String.t`, *default:* `nil`) - Reference to a view element, identified by its resource name, if it has one.
  *   `screenId` (*type:* `String.t`, *default:* `nil`) - ID of the screen for the suggestion. It is used for getting the corresponding screenshot path. For example, screen_id "1" corresponds to "1.png" file in GCS. Always set.
  *   `secondaryPriority` (*type:* `float()`, *default:* `nil`) - Relative importance of a suggestion as compared with other suggestions that have the same priority and category. This is a meaningless value that can be used to order suggestions that are in the same category and have the same priority. The larger values have higher priority (i.e., are more important). Optional.
  *   `shortMessage` (*type:* `GoogleApi.ToolResults.V1beta3.Model.SafeHtmlProto.t`, *default:* `nil`) - Concise message, in the user's language, representing the suggestion, which may contain markup. Always set.
  *   `title` (*type:* `String.t`, *default:* `nil`) - General title for the suggestion, in the user's language, without markup. Always set.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :helpUrl => String.t() | nil,
          :longMessage => GoogleApi.ToolResults.V1beta3.Model.SafeHtmlProto.t() | nil,
          :priority => String.t() | nil,
          :pseudoResourceId => String.t() | nil,
          :region => GoogleApi.ToolResults.V1beta3.Model.RegionProto.t() | nil,
          :resourceName => String.t() | nil,
          :screenId => String.t() | nil,
          :secondaryPriority => float() | nil,
          :shortMessage => GoogleApi.ToolResults.V1beta3.Model.SafeHtmlProto.t() | nil,
          :title => String.t() | nil
        }

  field(:helpUrl)
  field(:longMessage, as: GoogleApi.ToolResults.V1beta3.Model.SafeHtmlProto)
  field(:priority)
  field(:pseudoResourceId)
  field(:region, as: GoogleApi.ToolResults.V1beta3.Model.RegionProto)
  field(:resourceName)
  field(:screenId)
  field(:secondaryPriority)
  field(:shortMessage, as: GoogleApi.ToolResults.V1beta3.Model.SafeHtmlProto)
  field(:title)
end

defimpl Poison.Decoder, for: GoogleApi.ToolResults.V1beta3.Model.SuggestionProto do
  def decode(value, options) do
    GoogleApi.ToolResults.V1beta3.Model.SuggestionProto.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.ToolResults.V1beta3.Model.SuggestionProto do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
